<template>
  <div id="app">
    <div class="loading" v-if="loading">
      <double-bounce></double-bounce>
    </div>
    <router-view/>
  </div>
</template>

<script>
import {mapGetters} from 'vuex'
import {DoubleBounce} from 'vue-loading-spinner';
export default {
  name: 'App',
  components: {
    DoubleBounce
  },
  data(){
    return {
      main:[],
      sub:[]
    }
  },
  computed:{
    ...mapGetters(['loading'])
  }
}
</script>

<style>
html,body{
  height: 100%;
}
#app {
  height: 100%;
}
*{
  margin: 0;
  padding: 0;
  list-style: none;
}
ul{
  margin: 0;
}
.loading{
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  background: rgba(255, 255, 255, .8);
  z-index: 2;
}
.loading .spinner{
  position: absolute;
  left: 50%;
  top:50%;
  transform: translate(-50%,-50%);
}
</style>
